/**
 * Created by Cake on 2017/6/1.
 */

$(function () {

    var domProvince = $('.province');
    if (domProvince.length > 0) {
        domProvince.mobiscroll().select({
            theme: 'mobiscroll',
            mode: 'scroller',
            display: 'bottom',
            lang: 'zh',
            placeholder: '请选择项目所在省',
            headerText:"项目所在省",
            onInit: function() {
                domProvince
                    .val('')
                    .prev().val('');
            }
        });
    }

    var domCity = $('.city');
    if (domCity.length > 0) {
        domCity.mobiscroll().select({
            theme: 'mobiscroll',
            mode: 'scroller',
            display: 'bottom',
            lang: 'zh',
            placeholder: '请选择项目所在市',
            headerText:"项目所在市",
            onInit: function() {
                domCity
                    .val('')
                    .prev().val('');
            }
        });
    }

    var domArea = $('.area');
    if (domArea.length > 0) {
        domArea.mobiscroll().select({
            theme: 'mobiscroll',
            mode: 'scroller',
            display: 'bottom',
            lang: 'zh',
            placeholder: '请选择项目所在区',
            headerText:"项目所在区",
            onInit: function() {
                domArea
                    .val('')
                    .prev().val('');
            }
        });
    }

});
